package com.wuyou.designPatterns.chainofresponsibility;

/**
 * 解决奇数编号的问题
 *
 * @Date 2024/10/12 15:22
 * @Author 无忧
 */
public class OddSupport extends Support {

    public OddSupport(String name) {
        super(name);
    }

    @Override
    protected boolean resolve(Trouble trouble) {
        if (trouble.getNumber() % 2 == 1) {
            return true;
        }
        return false;
    }
}
